<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>3.ajax_get.html</title>


</head>
<body>
<div id="content">
</div>
<button id="btn">提交</button>

<script>
   let btn = document.getElementById("btn");
   let content = document.getElementById("content");
   btn.onclick=()=>{
     const  xhr = new XMLHttpRequest();
     xhr.open("get","./ajax_get");
     xhr.send();
     xhr.onreadystatechange =()=>{
       if (xhr.status === 4){

       }
     }

   }


 
</script>
</body>
</html>